<template>
    <div class="mui-content ucenterHome mui-scroll-wrapper mgb2">
        <div class="mui-scroll">
            <!--用户帐号-->
            <ul class="mui-table-view mui-table-view-chevron userCenter mgt1" v-link="{name:'ucenterProfile'}">
                <li class="mui-table-view-cell mui-media">
                    <a class="mui-navigate-right userCenterInfo" href="javascript:;">
                        <img v-bind:src="profile.peopleImage" class="mui-media-object mui-pull-left head-img" id="head-img" alt="">
                        <div class="mui-media-body">
                            <p class="table-view-cell-title">{{profile.peopleNickName}}</p>
                            <p v-if="profile.peoplePhone != null && profile.peoplePhone != ''" class='mui-ellipsis table-view-cell-text'>手机号:{{profile.peoplePhone | starPhone}}</p>
                            <p  class='mui-ellipsis table-view-cell-text mui-text-middle' v-if="profile.peoplePhone == null || profile.peoplePhone == ''">未绑定手机</p>
                        </div>
                    </a>
                </li>
            </ul>
            <!--我的订单-->
            <ul class="mui-table-view mui-table-view-chevron">
                <li class="mui-table-view-cell" >
                    <p class=" table-view-cell-title text2">
                        <span class="text2">我的订单</span>
                    </p>
                </li>
                <li  class="mui-table-view-cell orderindex">
                    <div class="col-3">
                        <a href="javascript:;" class="handle"  v-link="{name:'orderList',params:{tab:'needHandle'}}">
                            <i class="icon-daichuli color6 text6-size"></i>
                            <p class="text3">待处理</p>
                        </a>
                    </div>
                    <div class="col-3">
                        <a href="javascript:;" class="repair"  v-link="{name:'orderList',params:{tab:'needRepair'}}">
                            <i class="icon-daiweixiu color6 text6-size" @click="notRepair()"></i>
                            <p class="text3">待维修</p>
                        </a>
                    </div>
                    <div class="col-3">
                        <a href="javascript:;" class="evaluate"  v-link="{name:'orderList',params:{tab:'needComment'}}">
                            <i class="icon-daipingjia color6 text6-size"></i>
                            <p class="text3">待评价</p>
                        </a>
                    </div>
                    <div class="col-3">
                        <a href="javascript:;" class="allOrders" v-link="{name:'orderList',params:{tab:'all'}}">
                            <i class="icon-all color6 text6-size"></i>
                            <p class="text3 allOrdersText">全部订单</p>
                        </a>
                    </div>
                </li>
            </ul>
            <!--我的车辆-->
            <ul class="mui-table-view mui-table-view-chevron" v-link="{name:'ucenterCar',params:{from:'ucenter'}}">
                <li class="mui-table-view-cell">
                    <p class="mui-navigate-right table-view-cell-title">
                        <span>我的车辆</span>
                        <a class="mui-pull-right carInfo" v-if="carPlateNumber!=''">
                            <img class="carLogo" v-bind:src="carBrandImage" v-if="carBrandImage!=''">
                            <span class="right-text color2" v-if="carPlateNumber!=''">{{carPlateNumber}}</span>
                        </a>
                        <a class="mui-pull-right carInfo" v-if="carPlateNumber==''">
                            <span class="right-text text2-size color3">绑定车辆</span>
                        </a>
                    </p>
                </li>
            </ul>
            <!--我的评价-->
            <ul class="mui-table-view mui-table-view-chevron" v-link="{name:'commentList'}">
                <li class="mui-table-view-cell">
                    <a href="javascript:;" class="mui-navigate-right table-view-cell-title">我的评价</a>
                </li>
            </ul>
            <!--意见反馈-->
            <ul class="mui-table-view mui-table-view-chevron" v-link="{name:'feedbackInput'}">
                <li class="mui-table-view-cell">
                    <a href="javascript:;" class="mui-navigate-right table-view-cell-title">意见反馈</a>
                </li>
            </ul>
            <!--关于我们-->
            <!-- <ul class="mui-table-view mui-table-view-chevron" v-link="{name:'aboutus'}">
                <li class="mui-table-view-cell">
                    <a href="javascript:;" class="mui-navigate-right table-view-cell-title">关于我们</a>
                </li>
            </ul> -->
        </div>
    </div>
    <footer-nav-component index="ucenterHome"/>
</template>
<style>
    /*用户账户*/
    .ucenterHome .userCenter .userCenterInfo img{width: 1rem; height: 1rem; max-width:1rem !important;border-radius: 50%; }
    .ucenterHome ul{margin-bottom: .2rem;}
    .ucenterHome .table-view-cell-title{line-height: 0.4rem;}
    /*所有订单*/

    /*我的车辆*/
    .ucenterHome .carInfo .carLogo{display: inline-block; width: 0.55rem; height: 0.55rem; background-size: 95%; background-repeat: no-repeat; vertical-align: middle;}
    .ucenterHome .carInfo span{vertical-align: middle;}

    /*操作图标*/
    .ucenterHome .orderindex{padding-right: 15px !important;}
    .ucenterHome .orderindex div{text-align: center;}
    .ucenterHome .orderindex>div>a{display: inline-block; width: 100%; }
    .ucenterHome .orderindex .allOrdersText{text-indent:0.16rem;}
</style>
<script type="text/ecmascript-6">
    import footerNavComponent from '../../components/footer-nav/footer-nav.vue';
    import '../../fonts/mui.css';
    export default {
    	vuex:{
			getters:{
				carPlateNumber:function(state){
				    if(state.mycar.carPlateNumber==undefined||state.mycar.carPlateNumber==null){
				        return '';
                    }else {
                        return state.mycar.carPlateNumber;
                    };
				},
				carBrandModel:function(state){
					return state.mycar.carBrandModel;
				},
				carBrandImage:function(state){
				    if(state.mycar.carBrandImage==undefined||state.mycar.carBrandImage==null){
                        return '';
                    }else {
                        return state.mycar.carBrandImage;
                    }
				},
				profile(state) {
				    return state.profile;
				},
				enterpriseFlag(state) {
				    return state.enterpriseFlag;
				}
			}
		},
        data(){
            return{
            }
        },
        ready () {
            if (this.enterpriseFlag) {
                this.$route.router.go('/enterprise/home');
            };
            /*上拉下拉*/
            mui('.mui-scroll-wrapper').scroll({
                indicators: true, //是否显示滚动条
                deceleration : 0.0005,
            });
            console.log(this.carBrandImage);
        },
        components:{
            footerNavComponent
        },
        methods:{
        },
    };
</script>
